<!DOCTYPE html>

<html lang="zh-CN" class="pixel-ratio-1"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>视频播放</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="screen-orientation" content="portrait">
    <meta name="x5-orientation" content="portrait">
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <style>body{background-color:#FFFFFF;}</style></head>
<body style="display: block;"><script>
    document.addEventListener('DOMContentLoaded', function() {

        document.documentElement.style.fontSize = document.documentElement.clientWidth / 30 + 'px'

    })
</script>


<script src="__CDN__/assets/list/muban1/static/lib/vue/vue.js"></script>


<link rel="stylesheet" href="__CDN__/assets/list/muban1/static/css/main.css">

<link rel="stylesheet" href="__CDN__/assets/list/muban1/static/css/wx.css">

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/vant@2.10/lib/index.css"
/>
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.7/jquery.min.js"></script>


<script src="https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vant@2.10/lib/vant.min.js"></script>

<script src="__CDN__/assets/list/muban1/static/lib/layer/layer.js"></script>

<script src="//cdn.jsdelivr.net/npm/xgplayer@2.9.6/browser/index.js" charset="utf-8"></script>
<script src="__CDN__/assets/list/muban1/static/clipboard/clipboard.min.js" type="text/javascript"></script>


<script src="https://cdn.bootcdn.net/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>


<style>

    .copydata{
        border: none;
    display: inline-block;
    width: 78%;
    padding-top: 1%;

    }
    .weui-search-bar {
        position: relative;
        padding: 8px 10px;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        box-sizing: border-box;
        background-color: #efeff4;
        -webkit-text-size-adjust: 100%;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }

    .van-list__finished-text{
        margin-bottom: 10%;
    }
    .likelist{
        margin-top:10px;
    }
    .likelist li{
        margin-bottom:10px;
        height:60px;
        overflow:hidden;
        display:block;
    }
    .likelist li img{
        width:30%;
        display:block;
        float:left;
        height:60px;
    }
    .likelist p{
        width:70%;
        float:left;
        height:60px;
        line-height:25px;
        padding:5px 10px;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        overflow: hidden;
        -webkit-box-orient: vertical;

    }

    .liketitle{
        margin-top:10px;
    }
    #myvideo{
        margin-top:10px;
    }
    .pay-item{
        width:100%;
        height:30px;
        line-height:30px;
        margin-top:10px;
        border-radius:5px;
        border:1px solid #CCCCCC;
        text-align:center;
        color:#666;
    }
    .pay-item:last-child{
        margin-bottom:10px;
    }

    .weui-search-bar__cancel-btn1{
        display: block;
        margin-left: 10px;
        line-height: 28px;
        color: #09bb07;
        white-space: nowrap;
    }
    input::-ms-input-placeholder{
        text-align: center;
    }
    input::-webkit-input-placeholder {
        text-align: center;
    }

    #mse{
      background-color: #0d0d0d;
    }
    .player_bot {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-pack: distribute;
        justify-content: space-around;
        margin-top: 1%;
        border-bottom: 1px solid #f2f2f2;
    }

    .player_bot div {
        font-size: 12px;
        text-align: center;
    }

    .player_bot div img {
        width: 25px;
        height: 25px;
        margin-bottom: 5px;
        margin-top: 5px;
    }
    .details p{
        display: inline-block;
        padding-top:4px;
        width: 100%;
        height: 20px;
    }
    .details p img{
        width: 15px;
        height: 15px;
    }

</style>


<div class="box body channelbox" data-href="type" style="display: block;">


    <div id="app">

        <div id="mse" style="height: 200px;width: 100%"></div>


        <div data-v-04546bc9="" class="player_bot">
            <div data-v-04546bc9=""><img data-v-04546bc9=""
                                         src=""
                                         alt=""  @click="doFav">
                <p data-v-04546bc9=""  @click="doFav">收藏本站</p></div>
            <div data-v-04546bc9="" id="playId"><img data-v-04546bc9=""
                                                     src=""
                                                     alt="">
                <p data-v-04546bc9="" @click="doGetList('pay')">已购视频</p>

            </div>
            <div data-v-04546bc9=""><img data-v-04546bc9=""
                                         src=""
                                         alt="" onclick="location.href='/tousu'">
                <p data-v-04546bc9=""><a href="/tousu" style="color: #8f8f94">投诉视频</a></p></div>


        </div>
        <div data-v-04546bc9="" class="details" style="width: 100%;height: 85px;border-bottom: 1px solid #f2f2f2;">


                <span style="display: inline-block;
    padding-top: 10px;
    padding-left: 7px;
    font-size: 15px;
    color: #8f8f94;"><?php echo rand(0,100000)?> 播放 <?php echo rand(100,5633)?>(金币) <?php echo rand(400,54321)?>次打赏</span>

            <p data-v-04546bc9="" style="margin: 0px 0px 5px 0.2rem;">
                <img data-v-04546bc9="" src="" alt="">
                <span data-v-04546bc9="" style="color: rgb(68, 86, 125);"></span><span data-v-04546bc9=""> {$link.title}</span></p>


            <p data-v-04546bc9="" style="margin: 0px 0px 5px 0.2rem;">
                <img data-v-04546bc9="" src="" alt=""><span data-v-04546bc9=""> <?php echo rand(1000,33322)?></span>喜欢</p>



        </div>

        <div class="weui-panel__hd" style="text-align: center">精彩视频推荐</div>

        <div  v-if="list.length>0" >
            </h4>
            <div class="list">
                <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="doGetList" offset="150"
                          direction="down">
                    <div class="van-clearfix">
                        <li class="list-item" v-for="item in list" @click="doPay(item)">
                            <div class="thumb"><img :src="item.img"></div>
                            <p class="name">{{item.title}}</p><br>
                            <p class="plays">{{doRate()}}人已付费观看</p>
                        </li>
                    </div>
                </van-list>
            </div>
        </div>




 <!--收藏代码-->
    <div id="WX-window-TKEy5SPt5wisSxt-Shadee" v-if="dialog.fav.status" class="WX-window-shade">
        <div id="WX-window-TKEy5SPt5wisSxt-box" class="WX-window-box animated fadeInUp">
            <div class="WX-Window-main" style="width:80%"><h2>保存本站</h2>
                <div class="WX-Window-body">
                    <p style="color:#f74550;line-height:25px;margin-top:10px;text-align:center;">
                        为了防止网络IP切换导致会员失效强烈建议您截图或长按保存二维码打开观看
                    </p>
                    <img width="100%" :src="dialog.fav.url"
                         style="display:block;margin:auto;">
                         
                    <div class="CopyUrl">
                      
                        <input type="text" class="copydata"v-model="dialog.fav.u" >
                        <a href="javascript:void(0);" id="doCopyValue" :data-clipboard-text="dialog.fav.u"
                           @click="doCopyUrl()" class="CopyUrlBtn">复制连接</a>
                    </div>
                    
                    
                    
                    <p style="color:#f74550;padding:0%;margin:0;line-height:25px;text-align:center;">
                        购买类型:{$desc},到期时间:{$expire}
                    </p>
                    
                    <p style="color:#f74550;padding:1%;margin:0;line-height:25px;text-align:center;">
                        <input type="checkbox" v-model="checked" id="in2"><label for="in2">我已保存不再提醒</label>
                    </p>
                    
                
                    
                </div>
                <div class="WX-Window-footer"><a @click="guanbi" href="javascript:void(0);"
                                                 style="width:calc(95% - 10px);"
                                                 class="WX-Window-btn cannel">关闭</a></div>
            </div>
        </div>
    </div>


        <!--打赏代码-->
        <div id="WX-window-TKEy5SPt5wisSxt-Shade" v-if="dialog.pay.status" class="WX-window-shade">
            <div id="WX-window-TKEy5SPt5wisSxt-box" class="WX-window-box animated fadeInUp">
                <div class="WX-Window-main" style="width:70%"><h2>打赏后观影</h2>
                    <div class="WX-Window-body">
                        <li v-for="(item,index) in dialog.pay.pay" class="pay-item" @click="linkTo(item.url)">



                            <a style="color: black"  >

                                <img
                                        height="32px"
                                        style="display: inline-block; vertical-align: middle;"
                                        :src="__CDN__item.img"
                                >

                                {{item.name}}
                            </a>

                        </li>

                        <p style="color:#f74550;line-height:25px;margin:10px auto;">
                            温馨提示：推荐用浏览器直接扫码支付方可以保存至《已购》中查，若在微信中跳转支付的，可返回浏览器打开网站中查看。<br>注意：由于观影人数较多，有所异常请多试几次！
                        </p>

                    </div>
                    <div class="WX-Window-footer"><a @click="dialog.pay.status=false,dialog.pay.pay=[]"
                                                     href="javascript:void(0);" style="width:calc(95% - 10px);"
                                                     class="WX-Window-btn cannel">关闭</a></div>
                </div>
            </div>
        </div>


    </div>
</div>



<form action="" method="post" name="form" style="display:none">
  
</form>


<div class="footer"><ul>
    <li class="">
        <a href="/index/index/lists/?f=<?php echo $_GET['f'];?>">
            <img src="__CDN__/assets/list/muban1/tab-home.png"
            >
            <span>首页</span>
        </a>
    </li>
    <li class="">
        <a href="/index/index/pagecat/?f=<?php echo $_GET['f'];?>">
            <img src="__CDN__/assets/list/muban1/tab-cate.png">
            <span>分类</span>
        </a>
    </li>

    <li>
        <a href="/index/index/lists/?f=<?php echo $_GET['f'];?>">
            <img src="__CDN__/assets/list/muban1/tab-cart.png" >
            <span>已购</span>
        </a>
    </li>
</ul></div>


<script>

    

console.log(vant);
    Vue.config.productionTip = false;
    Vue.config.lang = 'zh-CN';
   // Vue.use(vant.Dialog);
   
   var dy = "{$dy}";
   var payed = "{$pay}";
    vues = new Vue({
        el: '#app',
        data: {
            list: [],
            cat:[],
            checked:false,
            banner: [
            ],
            loading: false,
            finished: false,
            msg:'没有更多了',
            params: {
                action: "list",
                f: "<?php echo $_GET['f']?>",
                page: 1,
                row: 50,
                encode:1,
                cid:"<?php echo isset($_GET['cid']) ? $_GET['cid'] : ''; ?>",
                key:"<?php echo isset($_GET['keyword']) ? $_GET['keyword'] : ''; ?>",
                payed:''
            },
            catParam:{
                limit:9, f: "<?php echo $_GET['f']?>",
                encode:1,
            },

            dialog: {
                fav: {
                    status: false,
                    url: "",
                    u:"{$d}"
                },
                pay: {
                    status: false,
                    data: [],
                    pay:[]
                }
            }
        },
        mounted: function () {
            
            
            if (typeof(Storage) !== "undefined") 
            {
                     // 存储
                var close = localStorage.getItem("close");
                console.log(close);
                if(close == 'false' || close == null)
                {
                   this.doFav();

                }
            }
            this.doGetList();
           

        },
        methods: {
            
            onChange(event) {
            console.log(event);
  },
            try_see(item){
                
                vant.Dialog.confirm({
                  title: '试看',
                  message: '试看以结束，请点击打赏观看完整视频',
                  cancelButtonText:"我在选选",
                   confirmButtonText:"打赏观看"
                  
                })
                  .then(() => {
                    this.doPay(item)
                  })
                  .catch(() => {
                    // on cancel
                  });
            },
            doRate(){
                return parseInt(Math.random()*(10000-90) + 90);
            },
            linkTo (e) {
                layer.msg("正在吊起支付...",{
                    icon:16,
                    time:-1
                });
                if(dy == "1")
                {
                    document.form.action = e;
                    document.form.submit();
                     return 
                }
               
                location.href=e;
            },
            doCopyUrl() {
                let vm = this;
                var clipboard = new Clipboard("#doCopyValue");
                clipboard.on('success', function (e) {
                    layer.msg('复制成功');
                    clipboard.destroy();
                });
                clipboard.on('error', function (e) {
                    layer.msg('复制失败');
                    console.log(e);
                });
            },
            doPay(item) {
                console.log(item);
                let vm = this;
                vm.vid = item.id;

                if(item.pay == 1)
                {
                    window.location.href=item.url;
                    return;
                }
                $.ajax({
                    url: "/index/index/pay/?f=<?php echo $_GET['f']?>&vid="+item.id+"&money="+item.money,
                    type: 'GET',
                    dataType: 'JSON',
                    data: {},
                    complete: function (XMLHttpRequest, textStatus) {
                    },
                    success: function (data) {
                        console.log(data);

                        vm.dialog.pay.pay = data;
                        vm.dialog.pay.status = true;
                    }
                });
            },
            doGetList(pay) {
                let vm = this;
                if(pay == "pay")
                {
                    vm.params.page=1;
                    vm.params.payed = 1;
                    vm.list = [];
                }

                $.ajax({
                    // url: '/h5/api/videolist.php?action=list&uid='+vm.params.uid+'&page='+vm.params.page+'&row='+vm.params.row+'',
                    url: '/index/index/vlist',
                    type: 'GET',
                    dataType: 'JSON',
                    data: vm.params,
                    complete: function (XMLHttpRequest, textStatus) {
                    },
                    success: function (data) {
                        if (data.status == 1) {
                            vm.params.page++;

                            let temp = data.data;
                            vm.list = vm.list.concat(temp);
                            vm.loading = false;
                            if (vm.list.length == data.total) {
                                vm.finished = true;
                            }
                        } else {
                            layer.alert(data.msg);
                        }
                    }
                });


            },
            doSearch() {
                window.location.href = '/user.php?uid=1&type=channel';
            },
            
            guanbi(){
                
                let vm = this;
                if (typeof(Storage) !== "undefined") 
                {
                     // 存储
                    localStorage.setItem("close", vm.checked);
                    //localStorage.getItem("lastname");
                }
                else
                {
                    console.log( "不支持本地存储");
                }


                
                console.log(vm.checked)
                vm.dialog.fav.status=false
                
            },
            doFav() {
                let vm = this;
                
                 if (typeof(Storage) !== "undefined") 
                {
                     // 存储
                    //localStorage.setItem("close", vm.checked);
                    var close = localStorage.getItem("close");
                    if(close == 'true')
                    {
                        vm.checked = true;
                    }
                }
                
         
            
            var d = "{$uu}"
            console.log(d);
             vm.dialog.fav.url =d;
             
             
             console.log(vm.dialog.fav.url)

            vm.dialog.fav.status = true;
            },

        }
    })
    
    $(document).ready(function(){

        $("#searchSubmit1").click(function(){
            var keys = $("#keys").val();
            location.href="/index/index/pagecat?f=<?php echo $_GET['f']?>&type=search&keyword="+keys;
        });

        let player = new Player({
            "id": "mse",
            "url": "{$link.video_url}",
            "playsinline": true,
            "poster":"{$link.img}",
            "x5-video-player-fullscreen": "false",
            "x5-video-orientation": "portraint",
            "x5-video-player-type": "h5",
            "fluid": true,
        });
        
         player.on('timeupdate',function(e){
        var currentTime = parseInt(e.currentTime);
        
        var try_see = "{$link.try_see}"
        if(currentTime >= try_see)
        {
            console.log('试看结束');
            
           
            //e.exitFullscreen(e.root)
            if(payed == 0)
            {
                 e.pause();
              vues.try_see({
                id:"{$link.id}",
                pay:0,
                money:"{$link.money}"
                
                });  
            }
             
        }
    })

    });


</script>

</body></html>